Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building a package from dev_container #696

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

agirault
Copy link
Contributor

@agirault agirault commented Feb 20, 2025

Changes

  • Add build_and_package to ./dev_container that leverages build_and_run similarly to build_and_install. Bit of a workaround, but build_and_run might be refactored in the somewhat near future.
  • Need capabilities to retrieve dockerfile needed for building the package subcomponents. The current logic was very "application" specific. Could have built a more common approach for apps and packages, but again this logic relies on bash parsing and is not very robust, so just mimicking the current solution for now until that gets refactored.

Results

./dev_container build_and_package holoscan-networking
Building dev container...
2025-02-20 21:24:59 $ /home/agirault/projects/holoscan/holohub/dev_container build --docker_file operators/advanced_network/Dockerfile --img holohub:holoscan-networking
2025-02-20 21:24:59 $ export DOCKER_BUILDKIT=1
2025-02-20 21:24:59 $ docker build --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg BASE_IMAGE=nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-dgpu --build-arg GPU_TYPE=dgpu --build-arg COMPUTE_CAPACITY=8.6 --network=host -f operators/advanced_network/Dockerfile -t holohub:holoscan-networking /home/agirault/projects/holoscan/holohub
...
[command] cpack --config build/holoscan-networking/pkg/CPackConfig-holoscan-networking.cmake
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: Holohub
CPack: - Install project: Holohub []
CPack: Create package
CPack: - package: /workspace/holohub/holoscan-networking_0.1.0_arm64.deb generated.
Build done.
./dev_container build_and_package foo
Package foo not found in list of packages: (see ./run list_packages)

@agirault agirault requested review from tbirdso and jjomier February 20, 2025 21:30
@agirault
Copy link
Contributor Author

FYI @cliffburdick

@mocsharp
Copy link
Contributor

Hi @agirault, some package-app.sh scripts use the build_and_install command. Could you please ensure they still work and update them and the QA doc accordingly? Thanks.

@agirault
Copy link
Contributor Author

@mocsharp build_and_install is not affected.

If you have a specific test to run, can you provide instructions? ty

@agirault agirault force-pushed the ag/package-from-dev-container branch from f4c13d2 to dbb6a7b Compare February 21, 2025 17:57
Copy link
Contributor

@tbirdso tbirdso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @agirault , approved with minor comments.

Need capabilities to retrieve dockerfile needed for building
the package subcomponents

Signed-off-by: Alexis Girault <[email protected]>
Signed-off-by: Alexis Girault <[email protected]>
@agirault agirault force-pushed the ag/package-from-dev-container branch from d37ed11 to a765ed8 Compare February 21, 2025 20:07
Copy link
Contributor

@tbirdso tbirdso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tbirdso tbirdso merged commit 9f67b0f into main Feb 21, 2025
7 checks passed
@tbirdso tbirdso deleted the ag/package-from-dev-container branch February 21, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants